-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom config loader #889
Custom config loader #889
Conversation
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
d7805c1
to
98ebcb1
Compare
/assign @tenzen-y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add comments to point out the original codes? This means which codes did we copy from controller-runtime repository?
98ebcb1
to
ec05d3a
Compare
done |
98ebcb1
to
e867c23
Compare
e867c23
to
285f3fc
Compare
options, err = options.AndFrom(ctrl.ConfigFile().AtPath(configFile).OfKind(&cfg)) | ||
} | ||
func apply(configFile string) (ctrl.Options, configapi.Configuration, error) { | ||
options, cfg, err := config.Load(scheme, configFile) | ||
if err != nil { | ||
return options, cfg, err | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a TODO so that the code below goes to pkg/config?
Maybe config.Load
can receive the set of available integrations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer not to, we need to import jobframwork
and some of the jobs so the integration list is not empty. This is main reason I did not move this part already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but if config.Load
accepts as a parameter the list of integrations, we don't need the dependency.
I think in general it's a good practice to keep main.go
lean. But this is on the nit side.
285f3fc
to
65431a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
/label tide/merge-method-squash
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor, trasc The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Replace component-config with our implementation, since
sigs.k8s.io/controller-runtime/pkg/config/v1alpha1
is now deprecated.Which issue(s) this PR fixes:
Fixes #725
Special notes for your reviewer:
Does this PR introduce a user-facing change?